<script>
	import { setStorage, getStorage } from 'utils/utils.js'
	export default {
		onLaunch: function() {
			// console.log(this.$HT)
			// try{
			// 	let a = getStorage()
			// 	console.log(a,'aaaaaaaaa')
			// 	if(!a){this.setUser()}
			// }catch(e){
			// 	this.setUser()
			// }
			
			// #ifdef APP-PLUS
			plus.device.setWakelock(true)
			// #endif
		},
		onShow: function() {
			uni.getSystemInfo({
				success: res => this.SET_STATEBAR(res.statusBarHeight)
			})
		},
		onHide: function() {
		},
		methods:{
			setUser(){
				this.$HT({
					url: '/yUser/YLogin',
					data: {
						mobile: '15103475917',
						password: '123456',
					},
					isPost: true
				}).then( res => {
					setStorage('token', res.data.token)
				})
			}
		}
	}
</script>

<style>
	/*每个页面公共css */
	/* #ifndef APP-NVUE */
	@import url("./static/style/icon.css");
	@import url("./static/style/main.css");
	@import url("./uni.scss");
	/* #endif */
	
</style>
